package cn.com.digitalnet.ad.base;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;

import cn.com.digitalnet.ad.util.FileUploader;

import com.google.common.collect.Maps;

public class BaseController {

	@Autowired protected FileUploader uploader;
	
	//key:翻页字段名称,value:翻页字段中文
	protected Map<String, String> sortTypes = Maps.newLinkedHashMap();
	
	protected Sort getSort(String sortType){
		if(sortTypes.containsKey(sortType)){
			return new Sort(sortType);
		}else{
			return new Sort("id");
		}
	}
}
